const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const Merge = require('webpack-merge');
const CommonConfig = require('./webpack.config.common');
console.log('prooooo')

module.exports = Merge(CommonConfig,{
    devtool: "#source-map",
    plugins: [
        new HtmlWebpackPlugin({
            title: 'Development',
            template: './index.html',
            filename: 'index.html'
        }),
        new CleanWebpackPlugin(['dist']),
        new ExtractTextPlugin('style.css'),
        new webpack.DefinePlugin({
            'process.env': {
              'mode': JSON.stringify('development')
            }
          }),
        // new webpack.optimize.UglifyJsPlugin({
        //     sourceMap: options.devtool && (options.devtool.indexOf("sourcemap") >= 0 || options.devtool.indexOf("source-map") >= 0)
        // })
    ],
    mode: 'development'
});